{% extends 'base1.html' %}
{% block title %}订单页{% endblock %}
{% block noon %}
    {% if msg %}
        <script>
            alert("{{ msg }}");
        </script>
    {% endif %}
    <div class="main_con clearfix">
			<div class="right_content clearfix">
					<h3 class="common_title2">全部订单</h3>
                {% for order in page %}
					<ul class="order_list_th w978 clearfix">
						<li class="col01">{{ order.regtime}}</li>
						<li class="col02">订单号：{{ order.id }}4</li>
                        {% if order.ispay == 0 %}
						<li class="col02 stress">未支付</li>
                        {% else %}
                        <li class="col02 stress">已完结</li>
                        {% endif %}
					</ul>
					<table class="order_list_table w980">
						<tbody>
							<tr>
								<td width="55%">
									<ul class="order_goods_list clearfix">
										<li class="col01"><a href="#"><img src="{{ order.imgsrc}}"></li></a>
										<li class="col02">{{ order.housename }}</em></li>
										<li class="col03">{{ order.days }}天 </li>
										<li class="col04">价格 : {{order.price}}</li>
									</ul>
								</td>
								<td width="15%">押金 : 50.0</td>
                                {% if order.ispay == 0 %}
								    <td width="15%">待付款</td>
								    <td width="15%"><a href="/order/?orderids={{ order.ids }}" class="oper_btn">去付款</a></td>
                                {% else %}
                                    <td width="15%">已付款</td>
								    <td width="15%"><a href="/details/{{ order.houseid }}" class="oper_btn">查看房屋详情</a></td>
                                {% endif %}
							</tr>
						</tbody>
					</table>
				    {% endfor %}
				<div id="pagination">
    				<ul id="pagination-flickr">
					{% if page.has_previous %}
					<li class="previous"><a href="/userorder/?page_number={{ page.previous_page_number }}">&laquo;上一页</a></li>
					{% else %}
					<li class="previous-off">&laquo;上一页</li>
					{% endif %}
					 <li class="active">{{page.page_range}}</li>
					{% if page.has_next %}
					  <li class="next"><a href="/userorder/?page_number={{page.next_page_number}} ">下一页 &raquo;</a></li>
					{% else %}
					  <li class="next-off">下一页 &raquo;</li>
					{% endif %}
				   </ul>
				</div>
		</div>
	</div>
    <div class="footer">
        <div class="foot_link">
            <a href="#">关于我们</a>
            <span>|</span>
            <a href="#">联系我们</a>
            <span>|</span>
            <a href="#">招聘人才</a>
            <span>|</span>
            <a href="#">友情链接</a>
        </div>
        <p>CopyRight © 2016 短租客信息技术有限公司 All Rights Reserved</p>
        <p>电话：010-****888    京ICP备*******8号</p>
    </div>
    {% endblock %}